﻿@model TBlog.Web.Models.Article
@{
    Layout = "~/Views/Shared/_BlogLayoutPage.cshtml";
}
<style>
   
</style>
<div class="detailbody">
    <div class="titlediv">
        <h2 class="text-center detailtitle" id="@Model.ID">@Model.Title</h2>
    </div>
    <div class="createtime text-center"><i class="layui-icon timeicon" style="font-size: 1.4rem">&#xe60e;：</i><span class="timespan">@Model.CreateTime</span></div>
    <div class="detailcontent text-center"></div>

</div>

<script src="~/Scripts/jquery-3.1.1.min.js"></script>
@section scripts{
    <script>
        $(function () {
            var html = HTMLDecode("@Model.Content");
            $(".detailcontent").html(html);
        })
        function HTMLEncode(html) { var temp = document.createElement("div"); (temp.textContent != null) ? (temp.textContent = html) : (temp.innerText = html); var output = temp.innerHTML; temp = null; return output; }
        function HTMLDecode(text) { var temp = document.createElement("div"); temp.innerHTML = text; var output = temp.innerText || temp.textContent; temp = null; return output; }
        layui.use(['element', 'jquery'], function () {
            var $ = layui.jquery, element = layui.element;
            $(".layui-this").removeClass("layui-this");
            $(".layui-nav li:eq(1)").addClass('layui-this');
            $(".topon").bind("click", function () {
                $("body").animate({ scrollTop: 0 }, 600);
            })
        })
    </script>
}